/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
/**
 *
 * @author NS
 */
public class Profile_Create{
    private Connection conn;
    public Profile_Create(Connection conn){
        this.conn = conn;
    }
    public String createProfile(String name, String spu, String ct, String it){
        Statement stmt;
        try{
            stmt = conn.createStatement();
            System.out.println("CREATE PROFILE " + name + 
                              " LIMIT SESSIONS_PER_USER " + spu +
                              " CONNECT_TIME " + ct +
                              " IDLE_TIME " + it);
            stmt.executeQuery("CREATE PROFILE " + name + 
                              " LIMIT SESSIONS_PER_USER " + spu +
                              " CONNECT_TIME " + ct +
                              " IDLE_TIME " + it);
            return "success";
        }catch(SQLException e){
            return e.getMessage();
        }
    }
}
